/* ================================
   【账号管理菜单】相关样式
   ================================ */
.status-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.status-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.status-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-300);
  transition: var(--transition-base);
  border-radius: 24px;
}

.status-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--bg-white);
  transition: var(--transition-base);
  border-radius: 50%;
  box-shadow: var(--shadow-1);
}

input:checked + .status-slider {
  background-color: var(--success-color);
}

input:checked + .status-slider:before {
  transform: translateX(20px);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  font-size: 12px;
  font-weight: 500;
  min-width: 60px;
  height: 24px;
}

.status-badge.enabled {
  background: var(--success-bg);
  color: var(--success-color);
  border: 1px solid rgba(82, 196, 26, 0.2);
}

.status-badge.disabled {
  background: var(--danger-bg);
  color: var(--danger-color);
  border: 1px solid rgba(255, 77, 79, 0.2);
}

.account-row.disabled {
  opacity: 0.6;
  background-color: var(--bg-gray);
}

.account-row.disabled .cookie-value {
  background-color: var(--gray-100);
}

/* 关键词管理界面的状态提示 */
.account-badge .badge.bg-warning {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.disabled-account-notice {
  background: var(--warning-bg);
  border: 1px solid var(--warning-color);
  border-radius: var(--radius-base);
  padding: 12px;
  margin-bottom: 16px;
  color: var(--warning-color);
}

.disabled-account-notice .bi {
  color: var(--warning-color);
}

/* 扫码登录按钮特殊样式 */
.qr-login-btn {
  background: var(--success-color);
  border: none;
  box-shadow: var(--shadow-2);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.qr-login-btn:hover {
  background: var(--success-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-4);
}

.qr-login-btn:active {
  transform: translateY(0);
}

.qr-login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.qr-login-btn:hover::before {
  left: 100%;
}

/* 二维码容器样式 */
.qr-code-wrapper {
  border: 3px solid var(--success-color);
  box-shadow: var(--shadow-3);
  transition: var(--transition-base);
}

.qr-code-wrapper:hover {
  box-shadow: var(--shadow-4);
}

/* 步骤指引样式 */
.step-item {
  text-align: center;
}

.step-number {
  font-weight: bold;
  font-size: 14px;
  box-shadow: var(--shadow-2);
}

/* 手动输入按钮样式 */
.manual-input-btn {
  transition: var(--transition-base);
}

.manual-input-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

/* 等待提示样式 */
.bg-light-warning {
  background-color: var(--warning-bg) !important;
}

.qr-loading-tip {
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.8;
  }
}

/* 添加账号区域样式 */
#accounts-section .card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}

#accounts-section .card-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-weight: 600;
  padding: 20px 24px;
}

#accounts-section .card-body {
  padding: 24px;
}

/* 添加方式选择按钮 */
#accounts-section .btn-lg {
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition-base);
  border: 2px solid transparent;
}

#accounts-section .btn-lg:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
}

/* 表单样式优化 */
#accounts-section .form-control,
#accounts-section .form-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-base);
  padding: 12px;
  font-size: 14px;
  transition: var(--transition-base);
}

#accounts-section .form-control:focus,
#accounts-section .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-bg);
}

#accounts-section .form-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* 账号列表表格优化 */
#accounts-section .table {
  margin: 0;
}

#accounts-section .table th {
  background: var(--bg-gray);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  padding: 16px 12px;
  border: none;
  white-space: nowrap;
}

#accounts-section .table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  vertical-align: middle;
}

#accounts-section .table tbody tr:hover {
  background: var(--bg-gray);
}

#accounts-section .table tbody tr:last-child td {
  border-bottom: none;
}

/* Cookie值显示优化 */
#accounts-section .cookie-value {
  background: var(--gray-100);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-base);
  padding: 8px 12px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  max-height: 100px;
  overflow-y: auto;
  word-break: break-all;
  line-height: 1.4;
}

/* 按钮组优化 */
#accounts-section .btn-group .btn {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-base);
  margin-right: 4px;
}

#accounts-section .btn-group .btn:last-child {
  margin-right: 0;
}

/* 工具提示优化 */
#accounts-section [data-bs-toggle="tooltip"] {
  color: var(--text-tertiary);
  cursor: help;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .status-toggle {
    width: 40px;
    height: 20px;
  }

  .status-slider:before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
  }

  input:checked + .status-slider:before {
    transform: translateX(16px);
  }

  .qr-login-btn, .manual-input-btn {
    margin-bottom: 12px;
    font-size: 14px;
  }

  .step-item {
    margin-bottom: 16px;
  }

  .step-number {
    width: 25px !important;
    height: 25px !important;
    font-size: 12px;
  }

  #accounts-section .card-body {
    padding: 16px;
  }

  #accounts-section .card-header {
    padding: 16px;
  }

  #accounts-section .table th,
  #accounts-section .table td {
    padding: 12px 8px;
    font-size: 12px;
  }

  #accounts-section .btn-group {
    flex-direction: column;
    gap: 4px;
  }

  #accounts-section .btn-group .btn {
    width: 100%;
    margin-right: 0;
  }

  #accounts-section .cookie-value {
    font-size: 11px;
    max-height: 80px;
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  #accounts-section .btn-lg {
    padding: 16px 20px;
    font-size: 14px;
  }

  #accounts-section .table th,
  #accounts-section .table td {
    padding: 8px 6px;
    font-size: 11px;
  }

  .status-badge {
    font-size: 11px;
    padding: 3px 6px;
    min-width: 50px;
    height: 20px;
  }
}
